/**
 * 
 */
package mdb.com.vn.services;

import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

import mdb.com.vn.model.Card;
import mdb.com.vn.model.CardSms;
import mdb.com.vn.model.Casa;
import mdb.com.vn.model.Customer;
import mdb.com.vn.model.FixedDepositCasa;
import mdb.com.vn.model.FixedDeposits;
import mdb.com.vn.model.IBanking;
import mdb.com.vn.model.IBankingSms;
import mdb.com.vn.model.Loans;
import mdb.com.vn.model.LoansSMS;
import mdb.com.vn.model.LuckyDraw;
import mdb.com.vn.model.LuckyDrawG1;
import mdb.com.vn.model.LuckyDrawG2;
import mdb.com.vn.model.Results;
import mdb.com.vn.model.SME;
import mdb.com.vn.model.ScratchCard;
import mdb.com.vn.model.SmeSms;

/**
 * @author tu.dod
 *
 */
public interface MDBServices {
	
	public List<FixedDeposits> getAllFixedDeposits(); 
	public List<FixedDeposits> getListOfFixedDepositsPersonal(int type);
	public List<FixedDeposits> getListOfFixedDepositsCorporate(int type);
	
	public List<FixedDeposits> getListOfFixedDepositsByCustomerRef(String customerId);
	
	public List<FixedDepositCasa> getListOfFixedDepositCasaPersonal(int type);
	public List<FixedDepositCasa> getListOfFixedDepositCasaCorporate(int type);
	
	public List<FixedDepositCasa> getListOfFDCasaByCustomerRef(String customerId);
	public List<FixedDepositCasa> getAllFixedDepositCasas();
	public List<Loans> getListOfLoansPersonal(int type);
	public List<Loans> getListOfLoansCorporate(int type);
	
	public List<Casa> getListOfCasaPersonal(int type);
	public List<Casa> getListOfCasaCorporate(int type);
	
	public List<Casa> getListOfCasaByCustomerRef(String customerId);
	public List<Casa> getAllCasas();
	
	public List<ScratchCard> getListOfScratchCardByTranRef(String transRef);
	public List<ScratchCard> getListOfScratchCardByTranRef1(String transRef1);
	
	public String getAllLuckyDrawCodeP(String transRef,int type);
	public String getAllLuckyDrawG1Code(String transRef,String type);
	public String getAllLuckyDrawG1Code(String transRef,String customerId,String type);
	public String getAllLuckyDrawG2Code(String transRef,Date processDate,String type);
	public String getAllLuckyDrawG2Code(String mudule,String transRef,Date processDate,String status);
	
	public String getAllScratchCardCode(String transRef);
	public String getTotalScratchCardAmount(String transRef);
	public List<ScratchCard> getScratchCardByRef(String transRef);
	
	public String getCompanyNameByCode(String code);
	public int getSCardFDAvailable (String customerRef);
	public int getSCardCSAvailable (String customerRef);
	public int getSCardFDCSAvailable (String customerRef);
	
	public int getSCardFDAvailableException (String customerRef,String accountException);
	public int getSCardCSAvailableException (String customerRef,String accountException);
	public int getSCardFDCSAvailableException (String customerRef,String accountException);
	
	
	public double getAmountCorpAvailable (String customerRef);
	public double getAmountCorpAvailableException (String customerRef,String accountException);
	
	public void addFixedDepositCasa(FixedDepositCasa fixedDepositCasa);
	public void updateFixedDepositCasa(FixedDepositCasa fixedDepositCasa);
	public void deleteFixedDepositCasa(FixedDepositCasa fixedDepositCasa);
	
	public void addFixedDeposits(FixedDeposits fixedDeposits);
	public void updateFixedDeposits(FixedDeposits fixedDeposits);
	public void deleteFixedDeposits(FixedDeposits fixedDeposits);
	
	public FixedDeposits findFixedDepositsByCode(String savingBookNO);
	public FixedDepositCasa findFixedDepositCasaByCode(String savingBookNO,String savingAccountNo);
	
	public FixedDepositCasa findFixedDepositCasaByCodeFD(String savingBookNO);
	public FixedDepositCasa findFixedDepositCasaByCodeCS(String savingAccountNo);
	public Casa findCasaByCode(String accountLockedNo);
	
	public void addCasa(Casa casa);
	public void updateCasa(Casa casa);
	public void deleteCasa(Casa casa);
	
	public void addScratchCard(ScratchCard scratchCard);
	public void updateScratchCard(ScratchCard scratchCard);
	public void deleteScratchCard(ScratchCard scratchCard);
	public void deleteScratchCardByTransRef(String transRef);
	
	public void addLuckyDraw(LuckyDraw luckyDraw);
	public void updateLuckyDraw(LuckyDraw luckyDraw);
	public void deleteLuckyDraw(LuckyDraw luckyDraw);
	
	//public void addLoanSms(LoansSMS loansSMS );
	//public void updateLoanSms(LoansSMS loansSMS );
	//public void deleteLoanSms(LoansSMS loansSMS );
	
	
	///
	public void addLoansLuckyDrawByScript(String createdBy, Date processDate);
	public void addIBLuckyDrawG2ByScript(String createdBy, Date processDate);
	public void addCardLuckyDrawG2ByScript(String createdBy, Date processDate);

	 public void addSMELuckyDrawByScript(String createdBy, Date processDate);
	
	public List<Loans> getLoansByStatus(String status);
	public List<Loans> getLoansByStatusProcessDate(String status, Date processDate);
	public List<SME> getSMEByStatusProcessDate(String status, Date processDate);
	public Date getLastUpdatedLoans(String module);
	public List<Date> getDatesUpdatedLoans(String module);
	public List<SME> getSMEsByStatus(String status);
	
	public List<LuckyDrawG1> getLuckyDrawG1ByRefNo(String refNo, String status);
	public Customer getCustomerInfos(String gcif);
	
	public int countSCByDenomination(double denomination);
	public int countThanksScCard();
	
	
	public BigDecimal sumFDAmount();
	public BigDecimal sumSAAmount();
	public BigDecimal sumFDCAAmount();
	public int countAllLuckyDraw();
	public BigDecimal sumLoansAmount();
	
	public List<IBanking> getIBankingByStatus(String status);
	public List<Card> getCardByStatus(String status);
	public List<IBanking> getIBankingByStatus(String status,Date processDate);
	public List<Card> getCardByStatus(String status,Date processDate);
	
	public List<LuckyDrawG2> getLuckyDrawG2ByRefNo(String refNo, String status);
	
	public List<LoansSMS> getLoansSmsByAttributes(Date processDate, String status);
	public void addLoanSms(LoansSMS loansSMS );
	public void updateLoanSms(LoansSMS loansSMS );
	public void deleteLoanSms(LoansSMS loansSMS );
	
	public void addSmeSms(SmeSms smeSms );
	public void updateSmeSms(SmeSms smeSms );
	public void deleteSmeSms(SmeSms smeSms );
	
	public void addIBSms(IBankingSms iBankingSms );
	public void updateIBSms(IBankingSms iBankingSms );
	public void deleteIBSms(IBankingSms iBankingSms );
	
	public void addCardSms(CardSms cardSms );
	public void updateCardSms(CardSms cardSms );
	public void deleteCardSms(CardSms cardSms );
	
	public void addResult(Results results);
	
	public LoansSMS getLoanSmsByLD(String LD);
	public SmeSms getSmeSmsByProperties(String gcif, Date processDate);
	public IBankingSms getIBSmsByProperties(String gcif, Date processDate);
	public IBankingSms getIBSmsByID(long id);
	public List<IBankingSms> getIBSmsByProperties(String status);
	public List<IBankingSms> getIBSmsByIBSMSDateStatus(String status,Date proccessDate);
	
	
	public CardSms getCardSmsByProperties(String gcif,String status, Date processDate);
	public CardSms getCardSmsByID(long id);
	public List<CardSms> getCardSmsByProperties(String status);
	public List<CardSms> getCardSmsByIBSMSDateStatus(String status,Date proccessDate);
	
	
	public List<LoansSMS> getLoansSmsByStatus(String status);
	public List<SmeSms> findBySmeSmsByStatus(String status);
	public List<SmeSms> findBySmeSmsByStatusDate(String status, Date processDate);
	
	public List<Object> getLoansByPropertiesToExcell(String status,Date processDate);
	public List<Object> getLoansByPropertiesToExcell(String status);
	public List<Object> getLoansSmsByPropertiesToExcell(String status,Date processDate);
	public List<Object> getLoansSmsByPropertiesToExcell(String status);
	
	public LuckyDraw getLuckyDrawById(long id);
	public LuckyDrawG1 getLuckyDrawG1ById(long id);
	public LuckyDrawG2 getLuckyDrawG2ById(long id);
	
	public List<Results> getListResults();
	

}
